﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sudoku
{
    public class CompositeBox
    {
        private AtomicBox[] boxes = new AtomicBox[9];

        public AtomicBox[] Boxes
        {
            get { return boxes; }
        }
        
        public CompositeBox()
        {
            for (int i = 0; i < 9; i++)
                boxes[i] = new AtomicBox();
        }
        public bool isEditable(int atomic)
        {
            return boxes[atomic].Editable;
        }
        public bool isValid()
        {
            for(int i = 0; i < 9; i++)
            {
                if (boxes[i].EnteredDigit != boxes[i].OriginalDigit)
                    return false;
            }
            return true;
        }
    }
}
